//
//  SmsCloudPhoneBottomView.m
//  smsCloud
//
//  Created by 吴斌 on 2024/7/21.
//

#import "SmsCloudPhoneBottomView.h"
@interface SmsCloudPhoneBottomView()

@end
@implementation SmsCloudPhoneBottomView
-(instancetype)init{
    if (self == [super init]) {
        [self smsCloudInitView];
    }
    return self;
}
- (void)smsCloudInitView{
    UIButton * smsCloudPhoneBtn = [[UIButton alloc] init];
    [smsCloudPhoneBtn setBackgroundImage:[SmsCloudHead SmsCloudImageNamed:@"smsCloudPhone"] forState:UIControlStateNormal];
    [smsCloudPhoneBtn addTarget:self action:@selector(smsCloudPhone) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:smsCloudPhoneBtn];
    [smsCloudPhoneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([SmsCloudHead SmsCloudScreewRatio:24]));
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:21]));
        make.width.equalTo(@([SmsCloudHead SmsCloudScreewRatio:339]));
        make.height.equalTo(@([SmsCloudHead SmsCloudScreewRatio:80]));
    }];
    UIButton * smsCloudPhoneRecordBtn = [[UIButton alloc] init];
    [smsCloudPhoneRecordBtn setBackgroundImage:[SmsCloudHead SmsCloudImageNamed:@"smsCloudPhoneRecord"] forState:UIControlStateNormal];
    [smsCloudPhoneRecordBtn addTarget:self action:@selector(smsCloudPhoneRecord) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:smsCloudPhoneRecordBtn];
    [smsCloudPhoneRecordBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@(-[SmsCloudHead SmsCloudScreewRatio:24]));
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:21]));
        make.width.equalTo(@([SmsCloudHead SmsCloudScreewRatio:339]));
        make.height.equalTo(@([SmsCloudHead SmsCloudScreewRatio:80]));
    }];
}
- (void)smsCloudPhone{
    if (self.SmsCloudPhoneBlock) {
        self.SmsCloudPhoneBlock();
    }
}
- (void)smsCloudPhoneRecord{
    if (self.SmsCloudPhoneRecordBlock) {
        self.SmsCloudPhoneRecordBlock();
    }
}
@end
